<template>
  <div>
    <el-input class="defaultStyle" :placeholderStart="placeholderStart" v-model="input.inputStart" :style="cssstyle" :disabled="disabled"></el-input>
    <span>——</span>
    <el-input class="defaultStyle" :placeholderEnd="placeholderEnd" v-model="input.inputEnd" :style="cssstyle" :disabled="disabled"></el-input>
  </div>

</template>
<script>
export default {
  name: "Doubleinput",
  data() {
    return {
      input:{
        inputStart: "",
        inputEnd: "",
      }
    };
  },
  props: {
    cssstyle: {
      type: Object,
      default() {
        return {};
      }
    },
    placeholderStart: {
      type: String,
      default: "请输入"
    },
    placeholderEnd: {
      type: String,
      default: "请输入"
    },
    field: {
      type: String,
      default: ""
    },
    disabled: {
      type: Boolean,
      default:false
    }
  },
  watch: {
    input:{
      handler(val) {
        this.$emit("click", { val: val, field: this.field })
      },
      deep:true
    }

  }
};
</script>
<style lang='scss' scoped>
.defaultStyle{
width: 150px;
}
</style>
